//===================================
//File: Elem.h
//Definition elem
//Name: Smirnova O.P.
//Date: 09.07.11, v.1.0
//===================================
#ifndef ELEM_H
#define ELEM_H
#include <iostream>
#include <stdlib.h>
template <class T>
class Elem
{
private:
	T value; // elem value
	Elem<T> *next;  // pointer to next elem of list
public:
	Elem();
	Elem(T value);
	~Elem();
	//setters
	void setValue(T value);
	void setNext(Elem<T> *next);
	//getters
	T getValue();
	Elem<T>* getNext();


};
#endif




template <class T>
Elem<T>::Elem()
{

}
template <class T>
Elem<T>::Elem(T value)
{
     //	cout << "Elem:" << endl;
	this->value = value;
	this->next = 0;
       //	cout << "value=" << value << endl;
       //	cout << "Elem." << endl;
}
template <class T>
Elem<T>::~Elem()
{

 //  cout << "~Elem" << endl;
}
//setters
template <class T>
void Elem<T>::setValue(T value)
{
	this->value = value;

}
template <class T>
void Elem<T>::setNext(Elem<T> *next)
{

	this->next = next;
}
//getters
template <class T>
T Elem<T>::getValue()
{

	return value;
}
template <class T>
Elem<T>* Elem<T>::getNext()
{

	return next;
}
